

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main" />
    <title>Create Song</title>
  </head>
  <body>
    <div>
      <g:link controller="artist" action="show" id="${artistInstance.id}">Artist: ${artistInstance.name}</g:link>
    </div>
    <div>
      <h1>Create Song</h1>
      <h1>Artist: ${artistInstance.name}</h1>
      <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
      </g:if>
      <g:hasErrors bean="${songInstance}">
        <div class="errors">
          <g:renderErrors bean="${songInstance}" as="list" />
        </div>
      </g:hasErrors>
      <g:form action="save" method="post" params="[artistId:params.artistId]">
        <p>
          <label for="title">Title:</label><br />
          <span class="${hasErrors(bean:songInstance,field:'title','errors')}">
            <g:textField name="title" value="${songInstance.title}"/>
          </span>
        </p>
        <p>
          <label for="lyrics">Lyrics:</label><br />
          <span class="${hasErrors(bean:songInstance,field:'lyrics','errors')}">
            <g:textArea name="lyrics" value="${songInstance.lyrics}" cols="80" rows="30"/>
          </span>
        </p>
        <p>
          <g:submitButton name="create" value="Create" />
        </p>
      </g:form>
    </div>
  </body>
</html>
